home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / prog_bas / t2win_32.zip / _DMLANG.FRM < prev    next >
Text File  |  1996-05-14  |  12KB  |  530 lines

  1. VERSION 4.00
  2. Begin VB.Form frmDayMonth 
  3.    BorderStyle     =   4  'Fixed ToolWindow
  4.    Caption         =   "Days and months in different language"
  5.    ClientHeight    =   4065
  6.    ClientLeft      =   1890
  7.    ClientTop       =   3255
  8.    ClientWidth     =   8130
  9.    Height          =   4470
  10.    Left            =   1830
  11.    MaxButton       =   0   'False
  12.    MDIChild        =   -1  'True
  13.    ScaleHeight     =   4065
  14.    ScaleWidth      =   8130
  15.    ShowInTaskbar   =   0   'False
  16.    Top             =   2910
  17.    Width           =   8250
  18.    Begin Threed.SSPanel SSPanel1 
  19.       Align           =   1  'Align Top
  20.       Height          =   480
  21.       Left            =   0
  22.       TabIndex        =   1
  23.       Top             =   0
  24.       Width           =   8130
  25.       _Version        =   65536
  26.       _ExtentX        =   14340
  27.       _ExtentY        =   847
  28.       _StockProps     =   15
  29.       ForeColor       =   -2147483640
  30.       BackColor       =   12632256
  31.       Begin VB.ComboBox cmb_Function 
  32.          Height          =   315
  33.          Left            =   1365
  34.          TabIndex        =   2
  35.          Top             =   90
  36.          Width           =   5415
  37.       End
  38.       Begin Threed.SSCommand cmdNP 
  39.          Height          =   300
  40.          Index           =   1
  41.          Left            =   7770
  42.          TabIndex        =   6
  43.          Top             =   90
  44.          Width           =   255
  45.          _Version        =   65536
  46.          _ExtentX        =   450
  47.          _ExtentY        =   529
  48.          _StockProps     =   78
  49.          Caption         =   ">"
  50.          BevelWidth      =   1
  51.          Font3D          =   3
  52.          RoundedCorners  =   0   'False
  53.          Outline         =   0   'False
  54.       End
  55.       Begin Threed.SSCommand cmdNP 
  56.          Height          =   300
  57.          Index           =   0
  58.          Left            =   6930
  59.          TabIndex        =   5
  60.          Top             =   90
  61.          Width           =   255
  62.          _Version        =   65536
  63.          _ExtentX        =   450
  64.          _ExtentY        =   529
  65.          _StockProps     =   78
  66.          Caption         =   "<"
  67.          BevelWidth      =   1
  68.          Font3D          =   3
  69.          RoundedCorners  =   0   'False
  70.          Outline         =   0   'False
  71.       End
  72.       Begin VB.Label Label2 
  73.          Caption         =   "&Select a function"
  74.          Height          =   255
  75.          Left            =   90
  76.          TabIndex        =   4
  77.          Top             =   120
  78.          Width           =   1275
  79.       End
  80.       Begin Threed.SSCommand SSCommand1 
  81.          Default         =   -1  'True
  82.          Height          =   300
  83.          Left            =   7245
  84.          TabIndex        =   3
  85.          Top             =   90
  86.          Width           =   465
  87.          _Version        =   65536
  88.          _ExtentX        =   820
  89.          _ExtentY        =   529
  90.          _StockProps     =   78
  91.          Caption         =   "&Go"
  92.          BevelWidth      =   1
  93.          RoundedCorners  =   0   'False
  94.          Outline         =   0   'False
  95.       End
  96.    End
  97.    Begin VB.Label lbl_Result 
  98.       Appearance      =   0  'Flat
  99.       BackColor       =   &H80000005&
  100.       BackStyle       =   0  'Transparent
  101.       ForeColor       =   &H80000008&
  102.       Height          =   3345
  103.       Left            =   90
  104.       TabIndex        =   0
  105.       Top             =   630
  106.       Width           =   7935
  107.    End
  108. End
  109. Attribute VB_Name = "frmDayMonth"
  110. Attribute VB_Creatable = False
  111. Attribute VB_Exposed = False
  112. Option Explicit
  113. Option Base 1
  114.  
  115. Private Const Iteration = 250
  116.  
  117. Dim IsLoaded         As Integer
  118.  
  119. Dim TimerStartOk     As Integer
  120. Dim TimerCloseOk     As Integer
  121.  
  122. Dim TimerHandle      As Integer
  123. Dim TimerValue       As Long
  124.  
  125. Dim Language(LNG_FRENCH To LNG_POLISH) As String
  126.       
  127.  
  128. Private Sub cmdNP_Click(Index As Integer)
  129.  
  130.    Call sub_NextPrev(cmb_Function, Index)
  131.  
  132. End Sub
  133.  
  134.  
  135. Private Sub cmb_Function_Click()
  136.    
  137.    If (IsLoaded = False) Then Exit Sub
  138.    
  139.    Call cDisableFI(mdiT2W.Picture1)
  140.    
  141.    lbl_Result = ""
  142.    
  143.    DoEvents
  144.    
  145.    Select Case cmb_Function.ListIndex
  146.       Case 0
  147.          Call TestAscTime
  148.       Case 1
  149.          Call TestTinyDay
  150.       Case 2
  151.          Call TestSmallDay
  152.       Case 3
  153.          Call TestShortDay
  154.       Case 4
  155.          Call TestLongDay
  156.       Case 5
  157.          Call TestTinyMonth
  158.       Case 6
  159.          Call TestShortMonth
  160.       Case 7
  161.          Call TestLongMonth
  162.    End Select
  163.  
  164.    DoEvents
  165.    Call cEnableFI(mdiT2W.Picture1)
  166.    
  167. End Sub
  168.  
  169.  
  170. Private Sub Form_Activate()
  171.  
  172.    mdiT2W.Label2.Caption = cInsertBlocks(mdiT2W.Label2.Tag, "" & Iteration)
  173.  
  174. End Sub
  175.  
  176. Private Sub Form_Load()
  177.  
  178.    IsLoaded = False
  179.    
  180.    Show
  181.  
  182.    Call FillLanguage(Language())
  183.    
  184.    Call sub_Load_Combo(cmb_Function, T2WDirInst + "_dmlang.t2w")
  185.    
  186.    IsLoaded = True
  187.    
  188. End Sub
  189.  
  190. Private Sub SSCommand1_Click()
  191.    
  192.    Call cmb_Function_Click
  193.    
  194. End Sub
  195.  
  196.  
  197.  
  198.  
  199. Private Sub TestAscTime()
  200.    
  201.    Dim intResult        As Integer
  202.    Dim strResult        As String
  203.    Dim strDisplay       As String
  204.    
  205.    Dim i                As Integer
  206.    
  207.    intResult = 0
  208.    
  209.    strResult = ""
  210.    strDisplay = ""
  211.       
  212.    For i = LNG_FRENCH To LNG_POLISH
  213.       strDisplay = strDisplay + Language(i) + cGetAscTime(i) + vbCrLf + vbCrLf
  214.    Next i
  215.  
  216.    lbl_Result = strDisplay
  217.  
  218.    'time the function
  219.  
  220.    TimerHandle = cTimerOpen()
  221.    TimerStartOk = cTimerStart(TimerHandle)
  222.    
  223.    For i = 1 To Iteration
  224.       strResult = cGetAscTime(LNG_FRENCH)
  225.    Next i
  226.    
  227.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  228.    
  229.    TimerCloseOk = cTimerClose(TimerHandle)
  230.  
  231. End Sub
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245. Private Sub TestTinyDay()
  246.    
  247.    Dim intResult        As Integer
  248.    Dim strResult        As String
  249.    Dim strDisplay       As String
  250.    
  251.    Dim i                As Integer
  252.    Dim j                As Integer
  253.    
  254.    intResult = 0
  255.    
  256.    strResult = ""
  257.    strDisplay = ""
  258.    
  259.    For i = LNG_FRENCH To LNG_POLISH
  260.       strDisplay = strDisplay + Language(i)
  261.       For j = 1 To 7
  262.          strDisplay = strDisplay + cGetTinyDay(i, j) + " "
  263.       Next j
  264.       strDisplay = strDisplay + vbCrLf + vbCrLf
  265.    Next i
  266.    
  267.    lbl_Result = strDisplay
  268.  
  269.    'time the function
  270.  
  271.    TimerHandle = cTimerOpen()
  272.    TimerStartOk = cTimerStart(TimerHandle)
  273.    
  274.    For i = 1 To Iteration
  275.       strResult = cGetTinyDay(LNG_FRENCH, 1)
  276.    Next i
  277.    
  278.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  279.    
  280.    TimerCloseOk = cTimerClose(TimerHandle)
  281.  
  282. End Sub
  283.  
  284. Private Sub FillLanguage(arrLanguage() As String)
  285.  
  286.    arrLanguage(LNG_FRENCH) = "French : "
  287.    arrLanguage(LNG_DUTCH) = "Dutch : "
  288.    arrLanguage(LNG_GERMAN) = "German : "
  289.    arrLanguage(LNG_ENGLISH) = "English : "
  290.    arrLanguage(LNG_ITALIAN) = "Italian : "
  291.    arrLanguage(LNG_SPANISH) = "Spanish : "
  292.    arrLanguage(LNG_CATALAN) = "Catalan : "
  293.    arrLanguage(LNG_POLISH) = "Polish : "
  294.  
  295. End Sub
  296.  
  297. Private Sub TestSmallDay()
  298.    
  299.    Dim intResult        As Integer
  300.    Dim strResult        As String
  301.    Dim strDisplay       As String
  302.    
  303.    Dim i                As Integer
  304.    Dim j                As Integer
  305.    
  306.    intResult = 0
  307.    
  308.    strResult = ""
  309.    strDisplay = ""
  310.    
  311.    For i = LNG_FRENCH To LNG_POLISH
  312.       strDisplay = strDisplay + Language(i)
  313.       For j = 1 To 7
  314.          strDisplay = strDisplay + cGetSmallDay(i, j) + " "
  315.       Next j
  316.       strDisplay = strDisplay + vbCrLf + vbCrLf
  317.    Next i
  318.    
  319.    lbl_Result = strDisplay
  320.  
  321.    'time the function
  322.  
  323.    TimerHandle = cTimerOpen()
  324.    TimerStartOk = cTimerStart(TimerHandle)
  325.    
  326.    For i = 1 To Iteration
  327.       strResult = cGetSmallDay(LNG_FRENCH, 1)
  328.    Next i
  329.    
  330.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  331.    
  332.    TimerCloseOk = cTimerClose(TimerHandle)
  333.  
  334. End Sub
  335.  
  336. Private Sub TestLongDay()
  337.    
  338.    Dim intResult        As Integer
  339.    Dim strResult        As String
  340.    Dim strDisplay       As String
  341.    
  342.    Dim i                As Integer
  343.    Dim j                As Integer
  344.    
  345.    intResult = 0
  346.    
  347.    strResult = ""
  348.    strDisplay = ""
  349.    
  350.    For i = LNG_FRENCH To LNG_POLISH
  351.       strDisplay = strDisplay + Language(i)
  352.       For j = 1 To 7
  353.          strDisplay = strDisplay + cGetLongDay(i, j) + " "
  354.       Next j
  355.       strDisplay = strDisplay + vbCrLf + vbCrLf
  356.    Next i
  357.    
  358.    lbl_Result = strDisplay
  359.  
  360.    'time the function
  361.  
  362.    TimerHandle = cTimerOpen()
  363.    TimerStartOk = cTimerStart(TimerHandle)
  364.    
  365.    For i = 1 To Iteration
  366.       strResult = cGetLongDay(LNG_FRENCH, 1)
  367.    Next i
  368.    
  369.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  370.    
  371.    TimerCloseOk = cTimerClose(TimerHandle)
  372.  
  373. End Sub
  374.  
  375. Private Sub TestShortDay()
  376.    
  377.    Dim intResult        As Integer
  378.    Dim strResult        As String
  379.    Dim strDisplay       As String
  380.    
  381.    Dim i                As Integer
  382.    Dim j                As Integer
  383.    
  384.    intResult = 0
  385.    
  386.    strResult = ""
  387.    strDisplay = ""
  388.    
  389.    For i = LNG_FRENCH To LNG_POLISH
  390.       strDisplay = strDisplay + Language(i)
  391.       For j = 1 To 7
  392.          strDisplay = strDisplay + cGetShortDay(i, j) + " "
  393.       Next j
  394.       strDisplay = strDisplay + vbCrLf + vbCrLf
  395.    Next i
  396.    
  397.    lbl_Result = strDisplay
  398.  
  399.    'time the function
  400.  
  401.    TimerHandle = cTimerOpen()
  402.    TimerStartOk = cTimerStart(TimerHandle)
  403.    
  404.    For i = 1 To Iteration
  405.       strResult = cGetShortDay(LNG_FRENCH, 1)
  406.    Next i
  407.    
  408.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  409.    
  410.    TimerCloseOk = cTimerClose(TimerHandle)
  411.  
  412. End Sub
  413.  
  414. Private Sub TestTinyMonth()
  415.    
  416.    Dim intResult        As Integer
  417.    Dim strResult        As String
  418.    Dim strDisplay       As String
  419.    
  420.    Dim i                As Integer
  421.    Dim j                As Integer
  422.    
  423.    intResult = 0
  424.    
  425.    strResult = ""
  426.    strDisplay = ""
  427.    
  428.    For i = LNG_FRENCH To LNG_POLISH
  429.       strDisplay = strDisplay + Language(i)
  430.       For j = 1 To 12
  431.          strDisplay = strDisplay + cGetTinyMonth(i, j) + " "
  432.       Next j
  433.       strDisplay = strDisplay + vbCrLf + vbCrLf
  434.    Next i
  435.    
  436.    lbl_Result = strDisplay
  437.  
  438.    'time the function
  439.  
  440.    TimerHandle = cTimerOpen()
  441.    TimerStartOk = cTimerStart(TimerHandle)
  442.    
  443.    For i = 1 To Iteration
  444.       strResult = cGetTinyMonth(LNG_FRENCH, 1)
  445.    Next i
  446.    
  447.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  448.    
  449.    TimerCloseOk = cTimerClose(TimerHandle)
  450.  
  451. End Sub
  452.  
  453. Public Sub TestLongMonth()
  454.    
  455.    Dim intResult        As Integer
  456.    Dim strResult        As String
  457.    Dim strDisplay       As String
  458.    
  459.    Dim i                As Integer
  460.    Dim j                As Integer
  461.    
  462.    intResult = 0
  463.    
  464.    strResult = ""
  465.    strDisplay = ""
  466.    
  467.    For i = LNG_FRENCH To LNG_POLISH
  468.       strDisplay = strDisplay + Language(i)
  469.       For j = 1 To 12
  470.          strDisplay = strDisplay + cGetLongMonth(i, j) + " "
  471.       Next j
  472.       strDisplay = strDisplay + vbCrLf + vbCrLf
  473.    Next i
  474.    
  475.    lbl_Result = strDisplay
  476.  
  477.    'time the function
  478.  
  479.    TimerHandle = cTimerOpen()
  480.    TimerStartOk = cTimerStart(TimerHandle)
  481.    
  482.    For i = 1 To Iteration
  483.       strResult = cGetLongMonth(LNG_FRENCH, 1)
  484.    Next i
  485.    
  486.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  487.    
  488.    TimerCloseOk = cTimerClose(TimerHandle)
  489.  
  490. End Sub
  491.  
  492. Private Sub TestShortMonth()
  493.    
  494.    Dim intResult        As Integer
  495.    Dim strResult        As String
  496.    Dim strDisplay       As String
  497.    
  498.    Dim i                As Integer
  499.    Dim j                As Integer
  500.    
  501.    intResult = 0
  502.    
  503.    strResult = ""
  504.    strDisplay = ""
  505.    
  506.    For i = LNG_FRENCH To LNG_POLISH
  507.       strDisplay = strDisplay + Language(i)
  508.       For j = 1 To 12
  509.          strDisplay = strDisplay + cGetShortMonth(i, j) + " "
  510.       Next j
  511.       strDisplay = strDisplay + vbCrLf + vbCrLf
  512.    Next i
  513.    
  514.    lbl_Result = strDisplay
  515.  
  516.    'time the function
  517.  
  518.    TimerHandle = cTimerOpen()
  519.    TimerStartOk = cTimerStart(TimerHandle)
  520.    
  521.    For i = 1 To Iteration
  522.       strResult = cGetShortMonth(LNG_FRENCH, 1)
  523.    Next i
  524.    
  525.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  526.    
  527.    TimerCloseOk = cTimerClose(TimerHandle)
  528.  
  529. End Sub
  530.